
package com.mephi.interfaces;


import com.mephi.model.PieceMovement;


/**
 * It's providing iteration over list of moves.
 * @author mephisto
 * 2011-06-11
 */
public interface GameIterator
{
	/**
	 * 
	 * @return true if Game has next PieceMovement
	 */
	boolean hasNextPieceMovement();

	/**
	 * 
	 * @return the next PieceMovement
	 * 
	 * @throws NoSuchElementException if internal cursor indicates on element  
	 * 		   which does not exist - it can be possible by concurent 
	 * 		   modification
	 */
	PieceMovement nextPieceMovement();

	/**
	 * remove the current PieceMovement
	 * 
	 * @throws IllegalStateException if internal cursor is before the first 
	 * 		   element or behind the last
	 */
	void removePieceMovement(); 
}
